/**
 * 圈子详情里的cell
 */

var rootview = ui("$");
var app = sm("do_App");
var page = sm("do_Page");
var nf = sm("do_Notification");
var global = sm("do_Global");
var http = require("helper/http");
var openHelper = require("helper/open");
var activityHelper = require("helper/activity");

//ui
var do_ALayout_list=ui("do_ALayout_list");
var activityTitle=ui("activityTitle");
var activityState=ui("activityState");
var do_ALayout_1=ui("do_ALayout_1");
rootview.setMapping({   // 此处的Mapping只能设置在 RootView 上 ;
    "activityTitle.text" : "name",
    "activityTitle.tag" : "type",
    "activityState.text" : "showStatus",
    "activityState.tag" : "bizzId",
    "activityPrice.text" : "showCost",
    "activityImg.source" : "pathLogo",
    "activityAddr.text" : "address",
    "InforReply.text" : "replyCount",
    "do_ALayout_1.tag":"id"
});

rootview.on("dataRefreshed", function(){
	if(activityState.text=='已结束'){
		activityState.fontColor="C0C0C0FF";
	}else{
		activityState.fontColor="FF7E00FF";
	}
});
do_ALayout_list.on("touch", function() {
	openHelper.open("source://view/activity/list/main.ui",{type:activityHelper.type.CIRCLE,bizzId:activityState.tag});
});
do_ALayout_1.on("touch", function() {
	openHelper.open("source://view/activity/detail/msgBorderView.ui",{id:this.tag},"","pay_product_back");
});
